# -*- coding: utf-8 -*-

"""
DateTime   : 2020/12/17 15:49
Author     : ZhangYafei
Description: 多个类装饰器
"""
import time


class WashHands(object):
    def __init__(self, func):
        self._func = func

    def __call__(self):
        print('wash hands ...')
        return self._func()

class WashDishes(object):
    def __init__(self, func):
        self._func = func

    def __call__(self):
        ret = self._func()
        print('wash the dishes ...')
        return ret

@WashHands
@WashDishes
def eat():
    print('start eating ...')
    time.sleep(2)


eat()
"""
wash hands ...
start eating ...
wash the dishes ...
"""

